package fatworm.query.constant;

import fatworm.util.Lib;

public class NullConstant implements Constant {
	
	public NullConstant() {
		
	}
	
	public Object asJavaVal() {
		return null;
	}
	
	public boolean equals(Object obj) {
		NullConstant sc = (NullConstant)obj;
		if (sc != null)
			return true;
		else
			return false;
	}
	
	public int compareTo(Constant c) {
		NullConstant sc = (NullConstant)c;
		if (sc != null)
			return 0;
		
		Lib.assertNotReached();
		return 0;
	}
	
	public int hashCode() {
		return ".null".hashCode();
	}
	
	public String toString() {
		return ".null";
	}
	
	public Constant plus(Constant c) {
		Lib.assertNotReached();
		return null;
	}
}